package com.toutou.base.bindhelper

import androidx.core.view.GravityCompat
import androidx.databinding.BindingAdapter

class DrawerLayoutBDAdapter {
    companion object{
        @JvmStatic
        @BindingAdapter(value = ["open"], requireAll = false)
        fun setDrawerOpen(drawerLayout: androidx.drawerlayout.widget.DrawerLayout, open: Boolean){
            if(open){
                drawerLayout.openDrawer(GravityCompat.END)
            } else {
                drawerLayout.closeDrawer(GravityCompat.END)
            }
        }
    }
}